package com.xr.wage.classItem;

import com.bstek.dorado.view.DefaultViewModel;
import com.bstek.dorado.common.DoradoContext;
import com.bstek.dorado.data.*;
import com.bstek.dorado.view.data.*;
import com.bstek.dorado.view.control.*;
import com.bstek.dorado.data.db.DBStatement;


/**
 * computerOrderViewModel
 */
public class computerOrderViewModel extends DefaultViewModel {
	public void setComputerOrder(ParameterSet parameters) throws Exception{ 
		Dataset dataset = getDataset("datasetComputerOrder");
		RecordIterator ri = dataset.recordIterator();
		DBStatement statement =new DBStatement();	
		String sql="";
		Record record;
		
		while (ri.hasNext()) {			  	
		  record = ri.nextRecord();			
		  sql="update wa_classitem set compute_order="+record.getString("compute_order")
          +" where classitem_id="+record.getString("CLASSITEM_ID");
		  statement.setSql(sql);  			  
		  statement.execute(); 
		  statement.close();
		}
	}
}
